package com.marketlive.system.encryption;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/

import org.marketlive.system.encryption.IDecryptor;

/**
 * Created by IntelliJ IDEA.
 * User: bradv
 * Date: Jan 27, 2006
 * Time: 6:15:56 PM
 * To change this template use File | Settings | File Templates.
 */
public class DummyDecryptor implements IDecryptor {
    private static Log log = LogFactory.getLog(DummyDecryptor.class);

    /**
     * Init method to setup encryption/decryption.
     */
    public void init() {

    }

    /**
      * Decrypt the encrypted input string using BC RSA encryption and return the decrypted string.
      * @param encryptedString the encrypted string to decipher.
      * @return returns an unencrypted string.
      */
     public String decrypt(String encryptedString) {
          return encryptedString;
    }

     /**
      * Decrypt the encrypted input string using BC RSA encryption and return the decrypted string.
      * @param keyCode the keyCode to lookup the private key from the KeyStore table.
      * @param encryptedString the encrypted string to decipher.
      * @return returns an unencrypted string.
      */
     public String decrypt(String keyCode, String encryptedString) {
          return encryptedString;
     }

     /**
      * Compares two encrypted strings and returns true if they are equal.  Requires decryption to do this.
      * @param encryptedString1  the first encrypted string to compare.
      * @param encryptedString2 the second encrypted string to compare.
      * @return returns true if the two values decrypt to the same value.
      */
     public boolean compare(String encryptedString1, String encryptedString2) {
            return true;
     }
}
